home *** CD-ROM | disk | FTP | other *** search
- Path: news.erl.sbs.de!news
- From: Gerolf Wendland <wendland%hpp015%hpp001.mch2.scn.de@scn.de>
- Newsgroups: comp.lang.c
- Subject: Re: big endian, little endian
- Date: Tue, 16 Apr 1996 14:52:43 +0200
- Organization: Siemens Business Services
- Message-ID: <3173981B.41C67EA6@scn.de>
- References: <4ku9dm$t1t@news.ycc.yale.edu> <3172C1E9.3E95@willows.com>
- NNTP-Posting-Host: 139.3.107.122
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-2
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; I; SunOS 4.1.3 sun4m)
-
- > rmurphy wrote:
- > >
- > > What is the difference between big-endian and
- > > little-endian?
- >
- > Actually it has nothing to with signed/unsigned integer rather it has to
- > do with how integers are represented in memory. If the
- > low byte is at the lower address then it uses little endian whereas if
- > the high byte is at the lower address then it used big endian.
- Exactly.
-
- Our everyday decimal numbers might serve as an example of big endian numbers.
- 321 is 3 times hundred plus 2 times 10 plus 1 time one. This is just by convention
- or tradition or whatever. This convention helps us to differ between 24 and 42.
-
- If the clever person who first invented that sort of reading decimal numbers had
- put it the other way round we would have read the number above as
- 3 times one plus 2 times ten plus 1 time one today. We might have called
- it little endian then. Fortunately, every human dealing with decimal numbers obeys
- the big endian convention.
-
- In the computer industry we deal with the Zahlensystem (number system?) of the base
- 256 if bytes are of 8 bit length and with both little and big endian machines.
-
- And just to confuse the poor programmer there are some platforms (VAX, I guess) that
- have little endian as far as their word ordering is concerned and inside those
- words they're having big endian byte ordering (or just the other way round).
-
- Yours confusingly,
- Gerolf
-